using UnityEngine;

public class SceneController
{
	public static int nextLevel = 1;

	public static int preLevel = -1;

	public static void loadNextScene(int scene)
	{
		//Platform.closeFeatureView();
		//GameData.save();
		if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().buildIndex != scene)
		{
			preLevel = UnityEngine.SceneManagement.SceneManager.GetActiveScene().buildIndex;
			nextLevel = scene;
			UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(0);
		}
	}

	public static void backToPreScene()
	{
		//GameData.save();
		if (preLevel >= 0 && UnityEngine.SceneManagement.SceneManager.GetActiveScene().buildIndex != preLevel)
		{
			nextLevel = preLevel;
			UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(0);
		}
	}
}
